/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 1.0.4</a>, using an XML
 * Schema.
 * $Id$
 */

package com.jzhao.jpre.format.sequential.castor;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;

/**
 * Class FieldTypeChoice.
 * 
 * @version $Revision$ $Date$
 */
public class FieldTypeChoice implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _length
     */
    private com.jzhao.jpre.format.sequential.castor.Length _length;

    /**
     * Field _delimiter
     */
    private com.jzhao.jpre.format.sequential.castor.Delimiter _delimiter;

    /**
     * Field _xmlTag
     */
    private com.jzhao.jpre.format.sequential.castor.XmlTag _xmlTag;

    /**
     * Field _tlv
     */
    private com.jzhao.jpre.format.sequential.castor.Tlv _tlv;


      //----------------/
     //- Constructors -/
    //----------------/

    public FieldTypeChoice() 
     {
        super();
    } //-- com.jzhao.jpre.format.sequential.castor.FieldTypeChoice()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Returns the value of field 'delimiter'.
     * 
     * @return the value of field 'Delimiter'.
     */
    public com.jzhao.jpre.format.sequential.castor.Delimiter getDelimiter()
    {
        return this._delimiter;
    } //-- com.jzhao.jpre.format.sequential.castor.Delimiter getDelimiter() 

    /**
     * Returns the value of field 'length'.
     * 
     * @return the value of field 'Length'.
     */
    public com.jzhao.jpre.format.sequential.castor.Length getLength()
    {
        return this._length;
    } //-- com.jzhao.jpre.format.sequential.castor.Length getLength() 

    /**
     * Returns the value of field 'tlv'.
     * 
     * @return the value of field 'Tlv'.
     */
    public com.jzhao.jpre.format.sequential.castor.Tlv getTlv()
    {
        return this._tlv;
    } //-- com.jzhao.jpre.format.sequential.castor.Tlv getTlv() 

    /**
     * Returns the value of field 'xmlTag'.
     * 
     * @return the value of field 'XmlTag'.
     */
    public com.jzhao.jpre.format.sequential.castor.XmlTag getXmlTag()
    {
        return this._xmlTag;
    } //-- com.jzhao.jpre.format.sequential.castor.XmlTag getXmlTag() 

    /**
     * Method isValid
     * 
     * 
     * 
     * @return true if this object is valid according to the schema
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * 
     * 
     * @param out
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * 
     * 
     * @param handler
     * @throws java.io.IOException if an IOException occurs during
     * marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Sets the value of field 'delimiter'.
     * 
     * @param delimiter the value of field 'delimiter'.
     */
    public void setDelimiter(com.jzhao.jpre.format.sequential.castor.Delimiter delimiter)
    {
        this._delimiter = delimiter;
    } //-- void setDelimiter(com.jzhao.jpre.format.sequential.castor.Delimiter) 

    /**
     * Sets the value of field 'length'.
     * 
     * @param length the value of field 'length'.
     */
    public void setLength(com.jzhao.jpre.format.sequential.castor.Length length)
    {
        this._length = length;
    } //-- void setLength(com.jzhao.jpre.format.sequential.castor.Length) 

    /**
     * Sets the value of field 'tlv'.
     * 
     * @param tlv the value of field 'tlv'.
     */
    public void setTlv(com.jzhao.jpre.format.sequential.castor.Tlv tlv)
    {
        this._tlv = tlv;
    } //-- void setTlv(com.jzhao.jpre.format.sequential.castor.Tlv) 

    /**
     * Sets the value of field 'xmlTag'.
     * 
     * @param xmlTag the value of field 'xmlTag'.
     */
    public void setXmlTag(com.jzhao.jpre.format.sequential.castor.XmlTag xmlTag)
    {
        this._xmlTag = xmlTag;
    } //-- void setXmlTag(com.jzhao.jpre.format.sequential.castor.XmlTag) 

    /**
     * Method unmarshal
     * 
     * 
     * 
     * @param reader
     * @throws org.exolab.castor.xml.MarshalException if object is
     * null or if any SAXException is thrown during marshaling
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     * @return the unmarshaled
     * com.jzhao.jpre.format.sequential.castor.FieldTypeChoice
     */
    public static com.jzhao.jpre.format.sequential.castor.FieldTypeChoice unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (com.jzhao.jpre.format.sequential.castor.FieldTypeChoice) Unmarshaller.unmarshal(com.jzhao.jpre.format.sequential.castor.FieldTypeChoice.class, reader);
    } //-- com.jzhao.jpre.format.sequential.castor.FieldTypeChoice unmarshal(java.io.Reader) 

    /**
     * 
     * 
     * @throws org.exolab.castor.xml.ValidationException if this
     * object is an invalid instance according to the schema
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}
